During the past years, systems for scanning the surface of moving objects have been developed and applied for grading, sorting or quality control purposes in many high volume manufacturing applications such as found in the automotive, consumer electronics, agricultural, food or wood and lumber processing industries. Such scanning systems typically use digital cameras generating 2D images from which reflection-related characteristics of the surface of objects under inspection are detected, which cameras can also be used as profile sensors based on laser triangulation to measure geometrical and other 3D surface characteristics of the inspected objects. In some applications, many characteristics of the object surface must be detected, thus requiring integration of several optical scanning sensors using associated lighting devices and whose outputs are combined for the desired purpose. A known defect detection system for lumber using that approach is disclosed in U.S. Pat. No. 5,960,104 to Conners et al., wherein color cameras are employed to detect surface features (2D), and a laser profiling device is employed to perform three-dimensional (3D) shape detection. In some prior known scanning apparatus, each scanning unit includes a digital camera associated with a single laser directing a linear-shaped laser beam onto the board surface under inspection, to form a laser line that intersects the field of view of the camera, which is capable of generating a 3D profile image of the board surface through a laser triangulation technique based on detected position of the laser line. Furthermore, to provide scanning unit compactness, it is known that from the same imaging sensors (CMOS or CCD) provided on such 3D digital camera, it is possible to simultaneously generate a 2D image of the same board surface from the measured mean intensities of the reflected laser line, such mode of operation being used by the optical inspection apparatus disclosed in U.S. Pat. No. 8,723,945 to Lessard. Moreover, a linear laser source can also be used to provide lighting in cases where only 2D imaging is required.
Typically, as shown in FIG. 1, a 2D image can be expressed in terms of a plurality of line image vectors forming a matrix with reference to orthogonal first and second axis X and Y, such as obtained while moving the inspected object (or the camera) relative to the camera (or the object) along Y axis, while performing laser scanning using a linear laser source that extends along X axis. Ideally, the intensity value of each image pixel should indicate the reflection-related characteristics (preferably referred to as luminance, but could be also referred to as reflectance, brightness or lightness) of the corresponding area of the scanned surface. However in practice, the measured variation may be affected by adverse external conditions to which the optical components of the sensor units (cameras, lighting sources) are subjected. In typical industrial environments, these optical components may be exposed at various levels to soiling caused by dirt and dust which deposit with time on the outer surface of optical light transmission parts such as protecting glass for camera objective and laser source, which soiling acts as an optical mask affecting intensity of light transmitted therethrough. Depending on the level and location of soiling, the intensity of light directed to the inspected surface (i.e. soiling affecting the lighting) or the intensity of reflected light reaching the imaging sensor (i.e. soiling affecting the image sensing) will be affected, providing an optical measurement which is more of less representative of the actual reflection-related characteristics of the inspected surface. Hence, there is a need for a method aimed at correcting reflection light intensity of a digital image to compensate for adverse external conditions to which the optical components of the sensor units are subjected.